#include <iostream>
#include <functional>
#include <vector>
#include <unordered_map>
using namespace std;
typedef function<void()> func;
vector<func> callbacks;
unordered_map<int,string> desc;
void mission1()
{
    cout<<"我执行任务1"<<endl;
}

void mission2()
{
    cout<<"我执行任务2"<<endl;
}

void mission3()
{
    cout<<"我执行任务3"<<endl;
}

void mission4()
{
    cout<<"我执行任务4"<<endl;
}

void load()
{
    desc.insert({sizeof(callbacks.size()),"mission1"});
    callbacks.push_back(mission1);
    desc.insert({sizeof(callbacks.size()),"mission2"});
    callbacks.push_back(mission2);
    desc.insert({sizeof(callbacks.size()),"mission3"});
    callbacks.push_back(mission3);
    desc.insert({sizeof(callbacks.size()),"mission4"});
    callbacks.push_back(mission4);
}

void show()
{
    for(int i = 0;i<callbacks.size();i++)
    {
        cout<<i<<' '<<desc[i]<<endl;
    }
}